//
// NeL - bindings
// Copyright (C) 2010 Naush
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU Affero General Public License as
//published by the Free Software Foundation, either version 3 of the
//License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU Affero General Public License for more details.
//
//You should have received a copy of the GNU Affero General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.

package org.ryzom.nel.misc;

public class CHashKeyMD5 {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CHashKeyMD5(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CHashKeyMD5 obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nelmiscJNI.delete_CHashKeyMD5(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setData(SWIGTYPE_p_unsigned_char value) {
    nelmiscJNI.CHashKeyMD5_Data_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
  }

  public SWIGTYPE_p_unsigned_char getData() {
    long cPtr = nelmiscJNI.CHashKeyMD5_Data_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
  }

  public void clear() {
    nelmiscJNI.CHashKeyMD5_clear(swigCPtr, this);
  }

  public String toString_c() {
    return nelmiscJNI.CHashKeyMD5_toString_c(swigCPtr, this);
  }

  public boolean fromString(String in) {
    return nelmiscJNI.CHashKeyMD5_fromString(swigCPtr, this, in);
  }

  public boolean isEqual(CHashKeyMD5 in) {
    return nelmiscJNI.CHashKeyMD5_isEqual(swigCPtr, this, CHashKeyMD5.getCPtr(in), in);
  }

  public boolean notEqual(CHashKeyMD5 in) {
    return nelmiscJNI.CHashKeyMD5_notEqual(swigCPtr, this, CHashKeyMD5.getCPtr(in), in);
  }

  public boolean lt(CHashKeyMD5 in) {
    return nelmiscJNI.CHashKeyMD5_lt(swigCPtr, this, CHashKeyMD5.getCPtr(in), in);
  }

  public void serial(IStream s) {
    nelmiscJNI.CHashKeyMD5_serial(swigCPtr, this, IStream.getCPtr(s), s);
  }

  public CHashKeyMD5() {
    this(nelmiscJNI.new_CHashKeyMD5(), true);
  }

}
